package com.mysiteforme.admin.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.mysiteforme.admin.entity.vo.VoTableField;
import com.mysiteforme.admin.entity.vo.VoTable;

import java.util.List;
import java.util.Map;

/**
 * Created by wangl on 2017/12/25.
 * todo:
 */
public interface TableService {

    List<VoTable> listAll();

    Integer getTableCount();

    Integer existTable(String tableName);

    Integer existTableField(Map<String,Object> map);

    void creatTable(VoTable voTable);

    void addColumn(VoTableField voTableField);

    void updateColumn(VoTableField voTableField);

    void dropTableField(String fieldName,String tableName);

    void dropTable(String tableName);

    Page<VoTable> selectTablePage(Page<VoTable> objectPage, Map<String,Object> map);

    List<VoTableField> selectFields(Map<String,Object> map);

    Page<VoTableField> selectTableFieldPage(Page<VoTableField> objectPage, Map<String,Object> map);

    VoTable detailTable(String name);

    void changeTableName(String name,String oldname,String comment,Integer tableType);

    void changeTableComment(String name,String comment,Integer tableType);
}
